<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


<!-- remove old header -->


<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>cogen API Reference Documentation
        - Class: SelectReactor</title><meta name="MSSmartTagsPreventParsing" content="true" /><meta http-equiv="imagetoolbar" content="no" /><link href="css/default.css" rel="stylesheet" type="text/css" /><link href="css/pygments.css" rel="stylesheet" type="text/css" />
    <!-- <link rel="shortcut icon" href="/images/favicon.ico" type="image/vnd.microsoft.icon"/> -->
    <link rel="stylesheet" href="css/apydia.css" type="text/css" />
    <script src="js/jquery-1.2.1.pack.js" type="text/javascript"></script>
    <script src="js/apydia.js" type="text/javascript"></script>
	<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
</head>
<body>
    <div id="page">
        <div id="browser">
            <div class="browser-section">
                <h2>Module Index</h2>
                <ul>
                    <li>
                        <a href="cogen.html">cogen</a>
                    </li><li>
                        <a href="cogen.common.html">cogen.common</a>
                    </li><li>
                        <a href="cogen.core.html">cogen.core</a>
                    </li><li>
                        <a href="cogen.core.coroutine.html">cogen.core.coroutine</a>
                    </li><li>
                        <a href="cogen.core.events.html">cogen.core.events</a>
                    </li><li>
                        <a href="cogen.core.queue.html">cogen.core.queue</a>
                    </li><li class="active">
                        <a href="cogen.core.reactors.html">cogen.core.reactors</a>
                    </li><li>
                        <a href="cogen.core.schedulers.html">cogen.core.schedulers</a>
                    </li><li>
                        <a href="cogen.core.sockets.html">cogen.core.sockets</a>
                    </li><li>
                        <a href="cogen.core.util.html">cogen.core.util</a>
                    </li><li>
                        <a href="cogen.web.html">cogen.web</a>
                    </li><li>
                        <a href="cogen.web.async.html">cogen.web.async</a>
                    </li><li>
                        <a href="cogen.web.wsgi.html">cogen.web.wsgi</a>
                    </li>
                </ul>
            </div>
            <div class="browser-section">
                <h2>Methods</h2>
                <ul>
                    <li>
                        <a href="cogen.core.reactors.SelectReactor.html#constructor">__init__</a>
                    </li><li>
                        <a href="cogen.core.reactors.SelectReactor.html#method-__len__">__len__</a>
                    </li><li>
                        <a href="cogen.core.reactors.SelectReactor.html#method-add">add</a>
                    </li><li>
                        <a href="cogen.core.reactors.SelectReactor.html#method-handle_errored">handle_errored</a>
                    </li><li>
                        <a href="cogen.core.reactors.SelectReactor.html#method-handle_events">handle_events</a>
                    </li><li>
                        <a href="cogen.core.reactors.SelectReactor.html#method-remove">remove</a>
                    </li><li>
                        <a href="cogen.core.reactors.SelectReactor.html#method-run">run</a>
                    </li><li>
                        <a href="cogen.core.reactors.SelectReactor.html#method-run_once">run_once</a>
                    </li><li>
                        <a href="cogen.core.reactors.SelectReactor.html#method-run_operation">run_operation</a>
                    </li><li>
                        <a href="cogen.core.reactors.SelectReactor.html#method-run_or_add">run_or_add</a>
                    </li><li>
                        <a href="cogen.core.reactors.SelectReactor.html#method-waiting_op">waiting_op</a>
                    </li>
                </ul>
            </div>
        </div>
        <div id="content">
    <h1>Class: cogen.core.reactors.SelectReactor</h1>
    <div class="docstring plain"></div>
    <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L147">View source</a>
    </li>
</ul>
    <div>
        <h2>Methods</h2>
            <h3 id="constructor">
                __init__
                <span class="args">(self, scheduler)</span>
            </h3>
            <div class="docstring plain"></div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L66">View source</a>
    </li>
</ul>
            <h3 id="method-__len__">
                __len__
                <span class="args">(self)</span>
            </h3>
            <div class="docstring plain">Returns number of waiting operations registered in the reactor.</div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L119">View source</a>
    </li>
</ul>
            <h3 id="method-add">
                add
                <span class="args">(self, op, coro)</span>
            </h3>
            <div class="docstring plain"></div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L156">View source</a>
    </li>
</ul>
            <h3 id="method-handle_errored">
                handle_errored
                <span class="args">(self, desc)</span>
            </h3>
            <div class="docstring plain">Handles descriptors that have errors.</div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L130">View source</a>
    </li>
</ul>
            <h3 id="method-handle_events">
                handle_events
                <span class="args">(self, ready, waiting_ops)</span>
            </h3>
            <div class="docstring plain"></div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L165">View source</a>
    </li>
</ul>
            <h3 id="method-remove">
                remove
                <span class="args">(self, op, coro)</span>
            </h3>
            <div class="docstring plain"></div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L148">View source</a>
    </li>
</ul>
            <h3 id="method-run">
                run
                <span class="args">(self, timeout=0)</span>
            </h3>
            <div class="docstring plain">Run a reactor loop and return new socket events. Timeout is a timedelta
object, 0 if active coros or None. <br /><br />select timeout param is a float number of seconds.</div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L182">View source</a>
    </li>
</ul>
            <h3 id="method-run_once">
                run_once
                <span class="args">(self, fdesc, waiting_ops)</span>
            </h3>
            <div class="docstring plain">Run a operation, remove it from the reactor and return the result.
Called from the main reactor loop. </div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L70">View source</a>
    </li>
</ul>
            <h3 id="method-run_operation">
                run_operation
                <span class="args">(self, op, reactor=True)</span>
            </h3>
            <div class="docstring plain">Run the socket op and return result or exception. </div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L78">View source</a>
    </li>
</ul>
            <h3 id="method-run_or_add">
                run_or_add
                <span class="args">(self, op, coro)</span>
            </h3>
            <div class="docstring plain">Perform operation and return result or add the operation in
the reactor if socket isn't ready and return none.
Called from the scheduller via SocketOperation.process. </div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L87">View source</a>
    </li>
</ul>
            <h3 id="method-waiting_op">
                waiting_op
                <span class="args">(self, testcoro)</span>
            </h3>
            <div class="docstring plain">Returns the registered operation for some specified coroutine.</div>
            <ul class="link-bar">
    <li class="top"><a href="#header">Top</a></li>
    <li class="link-to-sourcecode">
        <a href="http://cogen.googlecode.com/svn/trunk/cogen\cogen\core\reactors.py#L112">View source</a>
    </li>
</ul>
    </div>
        </div>
        <div id="footer">
            Generated with <a href="http://apydia.ematia.de/" class="extern">
            Apydia 0.0.3</a>
        </div>
    </div>
</body>
</html>